package com.yootk.main;

import com.yootk.vo.Company;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * PropertyEditor属性编辑器
 */
public class Demo08_PropertyEditor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Demo08_PropertyEditor.class);

    public static void main(String[] args) {
        test1();
    }

    public static void test1() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.scan("com.yootk.config");   // 扫描包配置
        context.refresh();
        Company company = context.getBean(Company.class);
        LOGGER.info("{}", company);
        LOGGER.info("{}", company.getAddress());
    }
}
